import {PlayerStatus} from "../../Constants";

export class Player{
    nickname:string = "";
    uid:number = 0;
    gold:number = 0;
    seat:number = 0;
    status:number = 0;

    setStatus(status:number){
        this.status=status;
    }

    isPlaying():boolean{
        return this.status == PlayerStatus.PLAYING || this.status == PlayerStatus.DISCONNECTED;
    }

    isReady():boolean{
        return this.status == PlayerStatus.READY;
    }

    isDisconnected():boolean{
        return this.status == PlayerStatus.DISCONNECTED;
    }
}